from rest_framework.serializers import ModelSerializer
from . import models as home_models
from product import models


class BannerSerializers(ModelSerializer):
    class Meta:
        model = home_models.Banner
        fields = ['name','image','search','note']


class CategoryModelSerializer(ModelSerializer):

    class Meta:
        model = models.Product_category
        fields = ['name',
                  'pk',
                  'is_home',
                  'icon',
                  'product_list',
                  'cover',

                  ]

class CountryModelSerializers(ModelSerializer):
    class Meta:
        model = models.Country
        fields =[
            'pk',
            'name',
            'img',
            'place_list'
        ]


class PlaceModelSerializer(ModelSerializer):
    class Meta:
        model = models.Place
        fields = [
            'name',
            'pk',
        ]